package com.example.test.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Map;

public class NewsComments {
    //光标在类里面按alt+insert,选择getter与setter自动生成
    @JsonProperty("comments_id") //更改属性名称
    private int id;
    @JsonIgnore //忽略属性不返回给前端
    private int newsId;
    private int uid;
    private String comments;
    private Map<Object,Object> user; //返回指定字段

    public Map<Object, Object> getUser() {
        return user;
    }
    public void setUser(Map<Object, Object> user) {
        this.user = user;
    }
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getNewsId() {
        return newsId;
    }

    public void setNewsId(int newsId) {
        this.newsId = newsId;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }
}
